from playwright.sync_api import Page, expect


def test_baidu_search(page: Page):
    # 访问百度页面搜索关键字
    page.goto("https://www.baidu.com/")
    page.locator('//input[@name="wd"]').fill("小博测试成长之路")
    page.get_by_text("百度一下").click()
    expect(page.get_by_text("xiaobotester.blog.csdn.net")).to_be_visible()
    page.wait_for_timeout(5_000)
